




<%@page pageEncoding="UTF-8" contentType="text/html; utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
	<head>
		<title>emplist</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css" />

	</head>
	<body>

	<form action="${pageContext.request.contextPath}/employee/plRemove" method="post">
		<div id="wrap">
			<div id="top_content"> 
				<div id="header">
						<div id="rightheader">

							<p>
                                当前用户：${sessionScope.username} <a href="${pageContext.request.contextPath}/user/exit">退出</a><br />
							</p>
						</div>
						<div id="topheader">
							<h1 id="title">
								<a href="#">通讯录</a>
							</h1>
						</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						Welcome!
					</h1>
					<p>
						<a href="${pageContext.request.contextPath}/addEmp.jsp">添加联系人</a>
					</p>
					<table class="table">
						<tr class="table_header">
							<td>勾选</td>
							<td>
								ID
							</td>
							<td>
								Name
							</td>
							<td>
								Salary
							</td>
							<td>
								birthday
							</td>
							<td>
								Operation
							</td>
						</tr>

						<c:forEach var="emp" items="${requestScope.employees}">
						<tr class="row1">

							<td><input type="checkbox" name="eids" value="${emp.eid}"/></td>
							<td>${emp.eid}</td>

							<td>${emp.empName}</td>

							<td>${emp.salary}</td>

							<td><fmt:formatDate value="${emp.birthday}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>

							<td>
								<a href="${pageContext.request.contextPath}/employee/queryone?employee.eid=${emp.eid}">修改</a>&nbsp;
								<a href="${pageContext.request.contextPath}/employee/remove?employee.eid=${emp.eid}">删除</a>
							</td>
						</tr>
						</c:forEach>


						<tr>
							<td colspan="7" align="center">
								<%--判断上一页--%>
								<c:if test="${requestScope.pageNumber > 1}">
									<a href="${pageContext.request.contextPath}/employee/findByPage?pageNumber=${requestScope.pageNumber-1}">上一页</a>
								</c:if>
								<c:if test="${requestScope.pageNumber <= 1}">
									上一页
								</c:if>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<%--遍历页号--%>
								<c:forEach var="page" begin="1" end="${requestScope.totalPage}">
									<a href="${pageContext.request.contextPath}/employee/findByPage?pageNumber=${page}"> ${page}  </a>
								</c:forEach>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<%--判断下一页--%>
								<c:if test="${requestScope.pageNumber < requestScope.totalPage}">
									<a href="${pageContext.request.contextPath}/employee/findByPage?pageNumber=${requestScope.pageNumber+1}">下一页</a>&nbsp;&nbsp;
								</c:if>
								<c:if test="${requestScope.pageNumber >= requestScope.totalPage}">
									下一页
								</c:if>
							</td>
						</tr>

						<tr>
							<td colspan="7" align="right"> <input type="submit" value="批量删除"/></td>
						</tr>


					</table>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
				ABC@126.com
				</div>
			</div>
		</div>
	</form>

	</body>
</html>
